//
//  RankCollectionViewCell.swift
//  ios_swift_demo1
//
//  Created by liutao on 2020/7/15.
//  Copyright © 2020 lt. All rights reserved.
//

import UIKit
import Kingfisher
import SnapKit

class RankCollectionViewCell: BaseCollectionViewCell {
    private lazy var imageView:UIImageView = {
        let bg = UIImageView()
        bg.contentMode = .scaleAspectFit
        return bg
    }()
    
    override func setup() {
        layer.cornerRadius = 5
        layer.borderWidth = 1
        layer.borderColor = UIColor.lightGray.withAlphaComponent(0.5).cgColor
        layer.masksToBounds = true
        
        contentView.addSubview(imageView)
        imageView.snp.makeConstraints{ make in
            make.edges.equalToSuperview()
        }
    }
    
    var model:LBURankingModel? {
        didSet{
            guard let model = model else {
                return
            }
            imageView.kf.setImage(urlString: model.cover)
        }
    }
    
    
    
}
